c02de9227cafbdda69578519a9f07d5ff65ef890,core/src/main/java/org/elasticsearch/search/SearchModule.java,SearchModule,registerBuiltinAggregations,#,527

Before Change


        registerAggregation(GeoBoundsAggregationBuilder::new, new GeoBoundsParser(), GeoBoundsAggregationBuilder.AGGREGATION_NAME_FIED);
        registerAggregation(GeoCentroidAggregationBuilder::new, new GeoCentroidParser(),
                GeoCentroidAggregationBuilder.AGGREGATION_NAME_FIELD);
        registerAggregation(ScriptedMetricAggregationBuilder::new, ScriptedMetricAggregationBuilder::parse,
                ScriptedMetricAggregationBuilder.AGGREGATION_NAME_FIELD);
        registerAggregation(ChildrenAggregationBuilder::new, ChildrenAggregationBuilder::parse,
                ChildrenAggregationBuilder.AGGREGATION_NAME_FIELD);

After Change


        registerAggregation(GeoBoundsAggregationBuilder::new, new GeoBoundsParser(), GeoBoundsAggregationBuilder.AGGREGATION_NAME_FIED);
        registerAggregation(new AggregationSpec(GeoCentroidAggregationBuilder::new, new GeoCentroidParser(),
                GeoCentroidAggregationBuilder.AGGREGATION_NAME_FIELD).addResultReader(InternalGeoCentroid::new));
        registerAggregation(new AggregationSpec(ScriptedMetricAggregationBuilder::new, ScriptedMetricAggregationBuilder::parse,
                ScriptedMetricAggregationBuilder.AGGREGATION_NAME_FIELD).addResultReader(InternalScriptedMetric::new));
        registerAggregation(ChildrenAggregationBuilder::new, ChildrenAggregationBuilder::parse,
                ChildrenAggregationBuilder.AGGREGATION_NAME_FIELD);